import Vue from 'vue'
import App from './App'
import uView from "uview-ui";
import ajax from "./request/request.js"
import store from "./store";
Vue.prototype.$store = store;

Vue.prototype.checkLogin = function(){
	const token = uni.getStorageSync('token')
	if(token === ''){ // 本地没有token表示未登录
		console.log('未登录返回到登录页')
		uni.reLaunch({url:'/pages/login/index'})
		return false
	}
}

Vue.prototype.$ajax = ajax;
Vue.use(uView);

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
